package com.jiaai.cloud.live.mapper;


import com.baomidou.mybatisplus.plugins.Page;
import com.jiaai.cloud.live.entity.TLiveBroadcast;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.jiaai.cloud.live.vo.BroadcastListVO;
import org.apache.ibatis.annotations.Param;



import java.util.List;
import java.util.Map;

/**
 * <p>
 * 直播间 Mapper 接口
 * </p>
 *
 * @author 佳爱网络科技
 * @version V1.0
 * @title TLiveBroadcastMapper.java
 * @since 2017/8/1
 */
public interface TLiveBroadcastMapper extends BaseMapper<TLiveBroadcast> {
    /***
     * 查找正在直播的主播间
     * @param page
     * @return
     */
    List<BroadcastListVO> findByBroadcastVo(Page page);


    /**
     * 查找主播任务
     * @param anchorId
     * @return
     */
//    @Select("SELECT * FROM t_live_broadcast Where anchorId =#{anchorId} ")
    public List<TLiveBroadcast> findByAnchorId(@Param("anchorId") String anchorId);


    // TLiveBroadcast currentBroadcastByUserId(@Param("userId") String userId);

    List<Map<String,Object>> selectDataCount();
}